function gradient = scaleGradient(A, b)

gradient = zeros(size(A, 1), size(A, 1), size(A, 2));

for i = 1:size(A, 1)
    for j = 1:size(A, 2)
        gradient(i, i, j) = gradient(i, i, j) + b(j);
    end
end
